package com.yuntian.dto;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class CustomerOrderDataDto {

    // 序号（前端显示用，动态赋值）
    private Integer rownum;
    //客户代码

    private String M00101;
    //客户名称
    private String M00103;
    //订单编码
    private String T00101;
    //销售数量
    private Integer T00203;
    //销售单价
    private BigDecimal T00204;
    //订单额
    private BigDecimal sum;

    public BigDecimal getSum() {
        if (T00203 == null || T00204 == null) {
            return BigDecimal.ZERO;
        }
        return T00204.multiply(new BigDecimal(T00203));
    }





}
